<?php 
function connect(){
	define('DB_HOST','localhost');
	define('DB_USER','root');
	define('DB_PWD','');
	define('DB_CHARSET','UTF8');
	define('DB_DBNAME','neu-video');
	$DBConnect=@mysql_connect(DB_HOST,DB_USER,DB_PWD) Or die('数据库连接失败!');
	mysql_set_charset(DB_CHARSET);
	mysql_select_db(DB_DBNAME,$DBConnect) Or die('指定数据库打开失败!');
	return $DBConnect;
}

function fetch_array($results){
   $arrs=array();
   while($results && ($row=mysql_fetch_assoc($results))!==FALSE)
{
     $arrs[]=$row;
}
	return $arrs;
}
 ?>
